<html>
<head>
<script>
function pos() {
    var req = false;
    var self = this;
    self.req = new XMLHttpRequest();
		self.req.open('POST', "ans.php", true);
    self.req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.req.onreadystatechange = function() {
     if (self.req.readyState == 4) {
      document.getElementById("result").innerHTML = self.req.responseText ;
      document.f1.v1.value = self.req.responseText;
  	 }
    }
    self.req.send("a=" + self.f1.word.value);
}
</script>
</head>
<body>
<form name="f1">
  <select name='word' onchange='pos()'>
   <option value='CT15'>CT15</option>
   <option value='CT15X'>CT15X</option>
  </select>
  
  <div id="result"></div>
  <input type=text name=v1 value=''></input>
</form>
</body>
</html>